package com.ifdemo;

import java.util.Scanner;

/*
用if-else判断最大值
*/
public class Demo1 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入第一个数字：");
        int a = sc.nextInt();
        System.out.println("请输入第一个数字：");
        int b = sc.nextInt();
        System.out.println("请输入第一个数字：");
        int c = sc.nextInt();
        if (a > b) {
            if (a > c) {
                System.out.println(a + "最大");
            } else {
                System.out.println(c + "最大");
            }
        } else {
            if (b > c) {
                System.out.println(b + "最大");
            } else {
                System.out.println(c + "最大");
            }
        }
    }
}
